//
// Created by 11510 on 2024/6/20.
//
#include <iostream>

using namespace std;

class A {
public:
    void func() { cout << "A::func()" << endl; }
    virtual void run() { cout << "A::run()" << endl; }
    virtual void run1() { cout << "A::run1()" << endl; }
    virtual void run2() { cout << "A::run2()" << endl; }
private:
    double a = 10;
};


class B :virtual public A{
public:
    virtual void run() override{ cout << "B::run()" << endl; };
    virtual void run1() override{ cout << "B::run1()" << endl; };
    virtual void run3() { cout << "B::run1()" << endl; };
private:
    double b = 1;
};


int main(void) {
    B b;
    A* a = &b;
    a->run();
    a->run1();

    return 0;
}